<template>
  <el-table :data="tableData" style="width: 100%;" height="725px">
    <el-table-column prop="comapnyName" label="项目名 "width="180"></el-table-column>
    <el-table-column prop="lable" label="项目属性"></el-table-column>
    <el-table-column prop="introduce" label="简介"></el-table-column>
    <el-table-column label="操作">
      <template slot-scope="scope">
        <el-button
          size="mini"
          @click="handleEdit(scope.$index, scope.row)">查看详情</el-button>
      </template>
    </el-table-column>
  </el-table>
</template>

<script>
  export default {
    data() {
      return {
        tableData: [
          { id:'',
            comapnyName:'',
            companyNo:'',
            namee:'',
            phone:'',
            lable:'',
            introduce:'',
            applyDocUrl:''
          }
        ]
      }
    },
    mounted: function(){
      var user= JSON.parse(window.sessionStorage.getItem("user"));
      var ff=user.id
      axios.post('/workroom/findProjectInvate',{
        wid : ff,
        id:ff
      }).then((response) => {
        if( response.data != null){
          this.$notify({
            title: '成功',
            message: '成功',
            type: 'success',
            duration:2000
          });
          var e=response.data
          console.log(e)
          var data=[];
          for(var c=0;c<e.length;c++){

            var ee=e[c];
            var obj={}
            obj.comapnyName=ee.projectName
            obj.id=ee.id
            obj.lable=ee.lable
            obj.introduce=ee.introduce
            data[c]=obj
            console.log(obj)
          }
          console.log(data)
          this. tableData=data


        }
        else{
          this.$notify({
            title: '失败',
            message: '错误',
            type: 'warning',
            duration:2000
          });
        }
      })

    },
    methods: {
      handleEdit(index, row) {
        console.log(row.id)
        var ff=row.id

        this.$router.push({
          path: '/Project',
          query: {
            mallCode: ff,
          }
        })

      },

    }}
</script>



<style scoped>

</style>
